<?php
include 'connect.php';
$sid = $_GET['sid'];
if ($sid == 'u') {
    echo "{form:{
                title:'Presidential Poll Survey',
                form_id:'vd',
                items:[
                        {label:
                            {text:'Thankyou for your time.'}
                        }
                    ]
                }
          }";
    $query = "INSERT INTO polls_survey SET candidate='undecided'";
    mysql_query($query) or die("Error executing '$query':" . mysql_error());
} else {
    header("location:forms.php?status==$sid");
}
?>